<!DOCTYPE html>
<html>

<head>
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8">
  <title>AbsoluteAdmin - A Responsive Boostrap 3 Admin Dashboard</title>
  <meta name="keywords" content="Bootstrap 3 Admin Dashboard Template Theme" />
  <meta name="description" content="AdminDesigns - Bootstrap 3 Admin Dashboard Theme">
  <meta name="author" content="AdminDesigns">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  {include file="/public/import_file" /}

</head>
<script>
          function all_checked() {
                var all_check = document.getElementById("allCheck");
              var check=document.getElementsByName("Check[]");
                if (all_check.checked) {
                    for(j=0;j<check.length;j++){
                        check[j].checked=1;
                    }
                } else {
                    for(j=0;j<check.length;j++){
                        check[j].checked=0;
                    }
                }
             }
          

           function delcheck(){

            var check=document.getElementsByName("Check[]");
            var flag=0;
            var dels="";
             for(j=0;j<check.length;j++){
                  if(check[j].checked)
                  {
                      flag=1; 
                      dels=dels+check[j].value+",";  
                  }
              }
              if(flag==0)
              {
                  alert("请选择信息后删除！")
                  return false;
              }
              else
              {
                //去掉最后一个逗号

                  dels=dels.replace(/,$/,"");
                  var path="delchecks?id="+dels;
                  location.href=path;
                  
              }
          }
    </script>

<body class="ecom-products-page">

  

  <!-- Start: Main -->
  <div id="main">

    <!-- Start: Header -->
    {include file="/public/header" /}
    <!-- End: Header -->

    <!-- Start: Sidebar -->
    <aside id="sidebar_left" class="nano nano-light affix">

      <!-- Start: Sidebar Left Content -->
      <div class="sidebar-left-content nano-content">

      

         <!-- Start: Sidebar Menu -->
        {include file="/public/menu" /}
        <!-- End: Sidebar Menu -->


	      <!-- Start: Sidebar Collapse Button -->
	      <div class="sidebar-toggle-mini">
	        <a href="#">
	          <span class="fa fa-sign-out"></span>
	        </a>
	      </div>
	      <!-- End: Sidebar Collapse Button -->

      </div>
      <!-- End: Sidebar Left Content -->

    </aside>

    <!-- Start: Content-Wrapper -->
    <section id="content_wrapper">

      
     

      <!-- Begin: Content -->
      <section id="content" class="table-layout animated fadeIn">

        <!-- begin: .tray-center -->
        <div class="tray tray-center">

          <!-- create new order panel -->
          <div class="panel mb25 mt5">
            <div class="panel-heading">
              <span class="panel-title hidden-xs">发布公告</span>
              
            </div>
            <div class="panel-body p20 pb10">

             <form method="post" action="{:url('addnotice')}" enctype="multipart/form-data"> 
              <div class="tab-content pn br-n admin-form">
            
           
              <textarea style="height: 160px;" class="gui-textarea br-light bg-light"  name="notice" placeholder="点此输入你要发布的公告信息..."></textarea>
              <input type="submit" class="button btn-system btn-file btn-block" style="margin-top: 10px" value="点击发布">
                        
                         


              </div>

              </form>  
            </div>
          </div>



          <!-- recent orders table -->
          <div class="panel">
            
            <div class="panel-body pn">
              <div class="table-responsive">
                <table class="table admin-form theme-warning tc-checkbox-1 fs13">
                  <thead>
                    <tr class="bg-light">
                      <th class="text-center">
                      <label class="option mn">
                      <input type="checkbox" id="allCheck" onchange="all_checked()"> 
                      <span class="checkbox mn"></span></label>&nbsp;全选&nbsp; 

                        <button type="button" onclick="delcheck()">
                          <i class="fa fa-trash"></i>
                        </button></th>
                      
                      <th class="text-center">公告信息</th>
                      <th class="text-right"><span style="margin-right: 48PX">日期</span></th>
                      
                      <th class="text-center">操作</th>
                

                    </tr>
                  </thead>
                  <tbody>
                   {volist name="noticelist" id="vo2"}  
                    <tr>
                      <td class="text-center">
                        <label class="option block mn">
                          <input type="checkbox"  name="Check[]" value="{$vo2.id}">
                          <span class="checkbox mn"></span>
                        </label>
                      </td>
                      
                      <td class="text-center">{$vo2.notice}</td>
                      
                      <td class="text-right">{$vo2.ndate}</td>
                      <td class="text-center">

                         <a href="{:url('notice_edit',array('id'=>$vo2['id']))}" style="margin-right:5px;" title="修改"><i class="glyphicons glyphicons-edit"></i></a>
                        <a href="{:url('notice_delete',array('id'=>$vo2['id']))}" title="删除"><i class="fa fa-trash"></i></a>
                      </td>
                      
                    </tr>
                  {/volist}  
 
                   
                   
                   
                   
                   
                    



                  </tbody>
                </table>
              </div>
            </div>
          </div>

        </div>
        <!-- end: .tray-center -->

      

      </section>
      <!-- End: Content -->

    </section>

   

  </div>
  <!-- End: Main -->

  <!-- BEGIN: PAGE SCRIPTS -->

  <!-- jQuery -->
  <script src="__PUBLIC__/static/admin/vendor/jquery/jquery-1.11.1.min.js"></script>
  <script src="__PUBLIC__/static/admin/vendor/jquery/jquery_ui/jquery-ui.min.js"></script>

  <!-- FileUpload JS -->
  <script src="__PUBLIC__/static/admin/vendor/plugins/fileupload/fileupload.js"></script>
  <script src="__PUBLIC__/static/admin/vendor/plugins/holder/holder.min.js"></script>

  <!-- Tagmanager JS -->
  <script src="__PUBLIC__/static/admin/vendor/plugins/tagsinput/tagsinput.min.js"></script>

  <!-- Theme Javascript -->
  <script src="__PUBLIC__/static/admin/assets/js/utility/utility.js"></script>
  <script src="__PUBLIC__/static/admin/assets/js/demo/demo.js"></script>
  <script src="__PUBLIC__/static/admin/assets/js/main.js"></script>
  <script type="text/javascript">
  jQuery(document).ready(function() {

    "use strict";

    // Init Theme Core    
    Core.init();

    // Init Demo JS  
    Demo.init();

    // select list dropdowns - placeholder like creation
    var selectList = $('.admin-form select');
    selectList.each(function(i, e) {
      $(e).on('change', function() {
        if ($(e).val() == "0") $(e).addClass("empty");
        else $(e).removeClass("empty")
      });
    });
    selectList.each(function(i, e) {
      $(e).change();
    });

    // Init TagsInput plugin
    $("input#tagsinput").tagsinput({
      tagClass: function(item) {
        return 'label bg-primary light';
      }
    });

  });
  </script>
  <!-- END: PAGE SCRIPTS -->

</body>

</html>
